/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package radiostation;

import java.awt.Dimension;
import java.awt.Toolkit;
import javax.persistence.EntityManager;
import javax.persistence.Query;
import javax.swing.JFrame;
import model.Musicgenre;
import model.Musicgroup;

/**
 *
 * @author stamatelopoulos
 */
public class DBManager {
       public static final EntityManager em =
           javax.persistence.Persistence.createEntityManagerFactory("RadioStationPU").createEntityManager();
       
        public static void centerOnScreen(JFrame f) {
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        Dimension screenSize = toolkit.getScreenSize();

        int x = (screenSize.width - f.getWidth()) / 2;
        int y = (screenSize.height - f.getHeight()) / 2;

        f.setLocation(x, y);
    }
}